home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 16 / IOPROG_16.ISO / soft / macaxsdk / macsdk.hqx / ActiveX DR3 SDK / ActiveX SDK / Control Common / CCPContainer.h / CCPContainer.h
Encoding:
Text File  |  1997-04-30  |  3.1 KB  |  139 lines  |  [TEXT/CWIE]

  1. // =============================================================================
  2. //
  3. // >>> ⌐ 1996-1997 Microsoft Corporation.  All rights reserved. <<<
  4. //
  5. // =============================================================================
  6.  
  7.  
  8. #ifndef _H_CCPContainer
  9. #define _H_CCPContainer
  10.  
  11. /*
  12. !CCPContainer();
  13. ªC ----- Connection point container class
  14.  CCPContainer methods
  15.     
  16.     DERIVED FROM:
  17.         IConnectionPintContainer
  18. */
  19.  
  20.  
  21. class CCPContainer:
  22.     public IConnectionPointContainer
  23. {
  24.  
  25. public:
  26.     //  *** CCPContainer methods ***
  27.     CCPContainer(short NumConnections);
  28.     /* ñ1 Constructor
  29.     ** INPUT:
  30.     **        short    initializer for the size of the connection point array
  31.     */
  32.  
  33.  
  34.     virtual ~CCPContainer(void);
  35.     /* ñ1 Destructor
  36.     ** INPUT:
  37.     **        void
  38.     */
  39.  
  40.  
  41.     
  42.     STDMETHOD(AddConnectionPoint)(IID RefID);
  43.     /* ñ1 CCPContainer method
  44.     ** INPUT:
  45.     **        IID        the reference id for the new connection point
  46.     ** RETURNS:
  47.     **        long    S_OK - everything is fine
  48.     **
  49.     ** Add a new connection point interface.
  50.     */
  51.  
  52.  
  53.     virtual void    ReleaseConnections(void);
  54.     /* ñ1 CCPContainer method
  55.     ** INPUT:
  56.     **        void
  57.     ** RETURNS:
  58.     **        void
  59.     **
  60.     ** Have all connection points release their connections.
  61.     */
  62.  
  63.  
  64.    
  65.     //  *** IUnknown methods ***
  66.     STDMETHOD(QueryInterface)(REFIID RefID, void** Obj);
  67.     /* ñ1 IUnknown method
  68.     ** INPUT:
  69.     **        REFIID    the interface id being queried for
  70.     **        void **    pointer to the interface being queried for
  71.     ** RETURNS:
  72.     **        long    S_OK - interface found
  73.     **                E_NOINTERFACE - no interface found
  74.     **
  75.     ** Returns a pointer to the specified interface on a component to which a
  76.     ** client currently holds an interface pointer.  The following interfaces
  77.     ** are accepted:  IID_IConnectionPointContainer and IID_IUnknown.
  78.     */
  79.  
  80.  
  81.     STDMETHOD_(Uint32, AddRef)(void);
  82.     /* ñ1 IUnknown method
  83.     ** INPUT:
  84.     **        void
  85.     ** RETURNS:
  86.     **        Uint32    the ref count for the object
  87.     **
  88.     ** Add a reference to this object.
  89.     */
  90.  
  91.  
  92.     STDMETHOD_(Uint32, Release)(void);
  93.     /* ñ1 IUnknown method
  94.     ** INPUT:
  95.     **        void
  96.     ** RETURNS:
  97.     **        Uint32    the reference count
  98.     **
  99.     ** Decrements the reference count for the calling interface on a object.  If
  100.     ** the reference count on the object falls to zero, the object is freed.
  101.     */
  102.  
  103.  
  104.  
  105.     // IConnectionPointContainer methods
  106.     STDMETHOD(EnumConnectionPoints)(THIS_ IEnumConnectionPoints** EnumCP);
  107.     /* ñ1 IConnectionPointContainer method
  108.     ** INPUT:
  109.     **        IEnumConnectionPoints **    output: the enumeration of connection points
  110.     ** RETURNS:
  111.     **        long                        S_OK - everything is fine
  112.     **
  113.     ** Set up an enumeration of connection points for the container.
  114.     */
  115.  
  116.  
  117.     STDMETHOD(FindConnectionPoint)(THIS_ REFIID RefID, IConnectionPoint** ConnectionPoint);
  118.     /* ñ1 IConnectionPointContainer method
  119.     ** INPUT:
  120.     **        REFIID                input: the interface id of the requested connection point
  121.     **        IConnectionPoint **    output: the connection point
  122.     ** RETURNS:
  123.     **        long                S_OK - everything is fine
  124.     **                            E_NOINTERFACE - interface doesn't exist
  125.     **
  126.     ** Find the connection point with the specified interface id.
  127.     */
  128.  
  129.  
  130.         
  131. private:
  132.     Uint32         m_RefCount;
  133.     LArray*        m_ConnectionPoints;    
  134. };
  135.  
  136. #endif // _H_CCPContainer
  137.  
  138.  
  139.